package com.example.an.service_exm;

import android.content.Intent;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.widget.Toast;

/**
 * Created by an on 2017/9/22.
 */
public class Service extends android.app.Service {

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        MainActivity app = MainActivity.getAppRef();
        app.btEvent("from Service");
        Toast.makeText(this, "这是系统自带的service", Toast.LENGTH_LONG).show();
    }
}
